import Vue from 'vue'
import App from './App'
import store from "@/Vuex/store.js"
// import axios from '@/axios/axios.js'

import "./utils/filters.js"//过滤器

import request from "./request/request.js"
Vue.prototype.$request = request
// Vue.prototype.$api = axios

Vue.prototype.$isLogin = function(){

	let myInfo = uni.getStorageSync('myInfo')
	console.log(myInfo)
	if(myInfo!=null){
		return
	}
	
		if (uni.getSystemInfoSync().platform == 'ios') {
			uni.showModal({
				title: '提示信息',
				content: '请先登录',
				confirmText: '去登录',
				cancelColor: "#262626",
				success(res) {
					if (res.confirm) {
						uni.navigateTo({
							url: '../theLogin/index'
						})
					} else if (res.cancel) {}
				}
			})
		} else {
			uni.showModal({
				title: '提示信息',
				content: '请先登录',
				cancelText: '去登录',
				confirmText: '取消',
				confirmColor: "#262626",
				success(res) {
					if (res.confirm) {
	
					} else if (res.cancel) {
						uni.navigateTo({
							url: '../theLogin/index'
						})
					}
				}
			})
		
	
	}
}
Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App,
	store
})
app.$mount()
